home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
COMPRESS
/
MTA_VE55.ARJ
/
MTA__BAT.EXE
/
lha
/
MTABETWN.BAT
< prev
next >
Wrap
DOS Batch File
|
1990-09-09
|
5KB
|
117 lines
ECHO OFF
REM ********************************************************************
REM * This is common batch-file, used as an extended replacement of *
REM * most of the MTA 11.15 options, now stripped. *
REM ********************************************************************
REM * In MTA's ExitBetweenConversion option, you can pass, besides *
REM * your own, three variables to this batch. MTA will replace these *
REM * variables with constants and will call this batch. *
REM * *
REM * The variables you can supply in ExitBewteenConversion (optio- *
REM * nal) will be replaced by: *
REM * *
REM * %1 : Relative directory containing the decompressed files. This *
REM * parameter is obsolete, because MTA will switch to this *
REM * directory, just before this batch is called, but is still *
REM * available because of compatibility with previous versions *
REM * %2 : New filename (not extension) of the NEW compressed file *
REM * to be created by MTA *
REM * %3 : New extension (no point) of the NEW compressed file to be *
REM * created by MTA *
REM ********************************************************************
REM
REM ********************************************************************
REM * WARNING: C:\ZIP is a temporary directory MTA does not use at all *
REM * so substitute one of your own (e.g. the root) !!!!!!!! *
REM ********************************************************************
REM
REM --------------------------------------------------------------------
REM - This example will: -
REM - = Create a file with CRC's (with CRC32.EXE) to be included in -
REM - the new archive. The name is the name of the new archive -
REM - with extension .CRC; -
REM - = Append this data to a masterfile called MASTER.CRC in C:\ZIP; -
REM - = Create a file with a directory of all files in the new ar- -
REM - chives (with MTD.EXE). The name is the name of the new archive -
REM - with extension .DIR; -
REM - = Append this data to a masterfile called MASTER.DIR in C:\ZIP -
REM --------------------------------------------------------------------
REM
REM Delete all old files from the directory (if any, can also be done
REM with MTA's Exclude options)
REM
DEL %2.CRC
DEL %2.DIR
REM
REM Create the file xxxxxxxx.CRC in the directory C:\ZIP
REM Never create the file in the CURRENT directory, because CRC32 will
REM then include the file xxxxxxxx.CRC (with a length of 0) in the
REM listing, because the redirected file is created as CRC32 starts;
REM
ECHO ----------------------------------------------------------------- >C:\ZIP\%2.CRC
ECHO CRC of File : %2.%3 >>C:\ZIP\%2.CRC
ECHO ----------------------------------------------------------------- >>C:\ZIP\%2.CRC
CRC32 >>C:\ZIP\%2.CRC
ECHO (EOF) >>C:\ZIP\%2.CRC
REM
REM Copy the xxxxxxxx.CRC file to the current directory and delete it
REM from C:\ZIP (you can replace COPY & DIR with MOVE if you have this
REM option available
REM
COPY C:\ZIP\%2.CRC
DEL C:\ZIP\%2.CRC
REM
REM Check if MASTER.CRC is available, if so, so a difficult append
REM otherwise create the file. You can replace this part with a
REM append-like statement if you have such a program available
REM
IF NOT EXIST C:\ZIP\MASTER.CRC GOTO CopyCRC
GOTO AppendCRC
:AppendCRC
COPY C:\ZIP\MASTER.CRC
COPY MASTER.CRC+%2.CRC C:\ZIP\MASTER.CRC
DEL MASTER.CRC
GOTO MakeDir
:CopyCRC
COPY %2.CRC C:\ZIP\MASTER.CRC
GOTO MakeDir
REM
REM Create a diretory of all uncompressed files and spool it to the
REM new file xxxxxxxx.DIR (use MTA_DIR)
REM Never create the file in the CURRENT directory, because MTA_DIR
REM will then include the file xxxxxxxx.DIR (with a length of 0) in
REM the listing, because the redirected file is created as MTA_DIR
REM starts;
REM
:MakeDir
ECHO ----------------------------------------------------------------- >C:\ZIP\%2.DIR
ECHO DIR of File : %2.%3 >>C:\ZIP\%2.DIR
ECHO ----------------------------------------------------------------- >>C:\ZIP\%2.DIR
DIR >>C:\ZIP\%2.DIR
REM
REM Copy the xxxxxxxx.DIR file to the current directory and delete it
REM from C:\ZIP (you can replace COPY & DIR with MOVE if you have this
REM option available
REM
COPY C:\ZIP\%2.DIR
DEL C:\ZIP\%2.DIR
REM
REM Check if MASTER.DIR is available, if so, so a difficult append
REM otherwise create the file. You can replace this part with a
REM append-like statement if you have such a program available
REM
IF NOT EXIST C:\ZIP\MASTER.DIR GOTO CopyDIR
GOTO AppendDIR
:AppendDIR
COPY C:\ZIP\MASTER.DIR
COPY MASTER.DIR+%2.DIR C:\ZIP\MASTER.DIR
DEL MASTER.DIR
GOTO EndBatch
:CopyDIR
COPY %2.DIR C:\ZIP\MASTER.DIR
GOTO EndBatch
REM
REM That is all there was.........
REM
:EndBatch